package cn.hzc.fortess.system.service;

import cn.hzc.fortess.system.entity.User;
import cn.hzc.fortess.system.node.MenuNode;
import cn.hzc.fortess.system.page.Pagination;
import cn.hzc.fortess.system.search.UserSearch;
import io.swagger.models.auth.In;

import javax.servlet.http.HttpSession;
import java.util.List;

public interface UserService {


    User getById(Integer userId);

    List<User> getUserByRole(Integer roleId);

    List<User> getUserByLessee(Integer lesseeId);

    void deleteByDept(Integer deptId);

    User getByLoginName(String account);

    void changePwd(HttpSession session, Integer userId, String oldPassword, String newPassword);

    void add(User entity);

    void update(User entity);

    void delete(Integer id);

    void updateUserStatus(Integer userId, Integer status);

    void updateUserPwd(HttpSession session, User user);

    Pagination getPage(UserSearch search);

    void setRoles(Integer userId, String[] roleIds);

    boolean hasResourceAuth(Integer userId, String resourceAuthIdent);


}
